#include "dominate3d.h"

#include <windows.h>

#include "../resource/resource.h"

INT_PTR CALLBACK MainDlgProc(
    HWND hwndDlg,
    UINT uMsg,
    WPARAM wParam,
    LPARAM lParam
)
{
    switch (uMsg)
    {
/*
        case WM_INITDIALOG:
            {
                HBITMAP hBmp = (HBITMAP )LoadImage(
                    GetModuleHandle(NULL), // HINSTANCE hinst,
                    MAKEINTRESOURCE(IDB_MAINMENU), // LPCTSTR lpszName,
                    IMAGE_BITMAP, // UINT uType,
                    0, // int cxDesired,
                    0, // int cyDesired,
                    LR_SHARED // UINT fuLoad
                );

                SendDlgItemMessage(hwndDlg, IDC_LOGO, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBmp);
            }
            return TRUE;
*/
        case WM_COMMAND:
            switch (wParam)
            {
                case IDC_JOINGAME:
                    EndDialog(hwndDlg, IDD_JOIN);
                    return TRUE;

                case IDC_CREATEGAME:
                    EndDialog(hwndDlg, IDD_OPTIONS);
                    return TRUE;

                case IDCANCEL:
                    EndDialog(hwndDlg, 0);
                    return TRUE;
            }
        break;
    }

    return FALSE;
}
